#pragma once

#include "commons.hxx"

#include <tccore/libtccore_exports.h>

#define REGISTER_PROPERTIES(site,decision,args) info_syslog("*Register properties, from: '%s.dll(.so)'...\n",TO_STRING(site));CHECK(OUR_register_properties(decision,args))
#define REGISTER_PROPERTY(business,name,desc,func,args,method) info_syslog("+Property - %s.%s\n",business,name);CHECK(METHOD_register_prop_method(business,name,desc,func,args,&method))

#ifdef __cplusplus
extern "C" {
#endif
/*
Deprecated:
    It will be removed from Tc10.
    From Tc8.3 onwards, please register the properties from BMIDE.

This function is an internal call used in $TC_ROOT/sample/properties/user_init.c and is used to register the methods against the specified types (as indicated in user_types_methods in user_init.c) against message TCTYPE_init_user_props_msg. This function is only called in user_init.c and should not be used elsewhere. To register methods against a type, add an entry to the user_types_methods structure.

Parameters
    user_types_methods (I) Array is used for registering Methods that initialize properties on types. Add an entry in this array to indicate the object Type. The array should be terminated with a NULL entry.
    array_size (I) Size of the user_types_methods array 
*/
extern TCCORE_API int TCTYPE_register_properties(USER_prop_init_entry_t* user_types_methods, int array_size);
#ifdef __cplusplus
}
#endif

int OUR_register_properties(int* decision, va_list args);
